<template>
	<uni-search-bar 
	:maxlength="maxlength" 
	:initText="initText" 
	:placeholder="placeholder" 
	:focus="focus" 
	:bgColorCls="useThemeColor?'bg-steelblue':'bg-white'" 
	:cancelColor="useThemeColor?'text-white':'text-black'"  
	@cancel="cancel"
	@confirm="confirm"
	 @input="input"></uni-search-bar>
</template>

<script>
	export default {
		props:{
			placeholder:{
				type:String,
				default(){
					return "请输入"
				}
			},
			focus:{
				type: Boolean,
				default: false
			},
			maxlength: {
				type: [Number, String],
				default: 100
			},
			useThemeColor:{
				type: Boolean,
				default: true
			},
			initText:{
				type:String,
				default(){
					return ""
				}
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			confirm(e){
				this.$emit('confirm',e)
			},
			input(e){
				this.$emit('input',e)
			},
			cancel(e){
				this.$emit('cancel',e)
			}
		}
	}
</script>

<style>

</style>
